﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using EFong.ServicesInterface;
using EFong.BL;
using EFong.Contract;

namespace EFong.Services
{
    public class ReportService : IReportService, IService
    {
        public Contract.ServiceResult<List<Contract.银行对账单>> GetReport01(Contract.BankAccount bankAccount, DateTime startDate, DateTime endDate)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.银行对账单>>(reportBL.GetReport01(bankAccount, startDate,endDate));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.银行对账单>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.银行对账单>>(e); }
        }

        public Contract.ServiceResult<List<Contract.银行对账单>> GetReport011(DateTime startDate, DateTime endDate)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.银行对账单>>(reportBL.GetReport011(startDate, endDate));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.银行对账单>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.银行对账单>>(e); }
        }

        public Contract.ServiceResult<List<Contract.供应商对账单>> GetReport02(RVendor vendor, DateTime month)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.供应商对账单>>(reportBL.GetReport02(vendor,month));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.供应商对账单>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.供应商对账单>>(e); }
        }

        public Contract.ServiceResult<List<Contract.固定费用清单>> GetReport03(DateTime month)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.固定费用清单>>(reportBL.GetReport03(month));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.固定费用清单>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.固定费用清单>>(e); }
        }

        public Contract.ServiceResult<List<Contract.零散费用清单>> GetReport04(DateTime month)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.零散费用清单>>(reportBL.GetReport04(month));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.零散费用清单>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.零散费用清单>>(e); }
        }

        public Contract.ServiceResult<List<Contract.利润表>> GetReport05(DateTime startDay, DateTime endDay)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.利润表>>(reportBL.GetReport05(startDay,endDay));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.利润表>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.利润表>>(e); }
        }

        public Contract.ServiceResult<List<Contract.飞机票月结对账单>> GetReport06(RCustomer customer, DateTime startDate, DateTime endDate)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.飞机票月结对账单>>(reportBL.GetReport06(customer, startDate,endDate));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.飞机票月结对账单>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.飞机票月结对账单>>(e); }
        }

        public Contract.ServiceResult<List<Contract.火车票月结对账单>> GetReport07(RCustomer customer, DateTime month)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.火车票月结对账单>>(reportBL.GetReport07(customer, month));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.火车票月结对账单>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.火车票月结对账单>>(e);}
        }

        public Contract.ServiceResult<List<Contract.酒店月结对账单>> GetReport08(RCustomer customer, DateTime month)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.酒店月结对账单>>(reportBL.GetReport08(customer, month));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.酒店月结对账单>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.酒店月结对账单>>(e); }
        }

        public Contract.ServiceResult<List<Contract.其他项目月结对账单>> GetReport09(RCustomer customer, DateTime month)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.其他项目月结对账单>>(reportBL.GetReport09(customer,month));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.其他项目月结对账单>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.其他项目月结对账单>>(e); }
        }

        public Contract.ServiceResult<List<Contract.每日订单报表>> GetReport10(DateTime day)
        {
           try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.每日订单报表>>(reportBL.GetReport10(day));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.每日订单报表>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.每日订单报表>>(e); }
        }

        public Contract.ServiceResult<List<Contract.应付款报表>> GetReport11()
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.应付款报表>>(reportBL.GetReport11());
            }
            catch (BusinessException be) { return this.Fail<List<Contract.应付款报表>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.应付款报表>>(e); }
        }

        public Contract.ServiceResult<List<Contract.应收款报表>> GetReport12()
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.应收款报表>>(reportBL.GetReport12());
            }
            catch (BusinessException be) { return this.Fail<List<Contract.应收款报表>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.应收款报表>>(e); }
        }

        public Contract.ServiceResult<List<Contract.已收款报表>> GetReport13(RCustomer customer, DateTime startDay, DateTime endDay)
        {
           try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.已收款报表>>(reportBL.GetReport13(customer,startDay,endDay));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.已收款报表>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.已收款报表>>(e);}
        }

        public Contract.ServiceResult<List<Contract.已付款报表>> GetReport14(RVendor vendor, DateTime startDay, DateTime endDay)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.已付款报表>>(reportBL.GetReport14(vendor , startDay , endDay));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.已付款报表>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.已付款报表>>(e); }
        }

        public Contract.ServiceResult<Contract.资金流动报表> GetReport15()
        {
           try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<Contract.资金流动报表>(reportBL.GetReport15());
            }
            catch (BusinessException be) { return this.Fail<Contract.资金流动报表>(be); }
            catch (Exception e) { return this.Fail<Contract.资金流动报表>(e); }
        }

        public Contract.ServiceResult<List<Contract.每日订单报表>> GetReport16(Contract.User orderUser, DateTime month)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.每日订单报表>>(reportBL.GetReport16(orderUser, month));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.每日订单报表>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.每日订单报表>>(e); }
        }

        public Contract.ServiceResult<List<Contract.每日订单报表>> GetReport17(Contract.User provideUser, DateTime month)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.每日订单报表>>(reportBL.GetReport17(provideUser, month));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.每日订单报表>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.每日订单报表>>(e); }
        }

        public Contract.ServiceResult<List<Contract.飞机总表>> GetReport18(DateTime startDate, DateTime endDate)
        {
            try
            {
                ReportBL reportBL = new ReportBL();
                return this.Return<List<Contract.飞机总表>>(reportBL.GetReport18(startDate, endDate));
            }
            catch (BusinessException be) { return this.Fail<List<Contract.飞机总表>>(be); }
            catch (Exception e) { return this.Fail<List<Contract.飞机总表>>(e); }
        }
    }
}
